package classes;

import java.util.ArrayList;

public class LearningObject 
{
	private String name_ = "";
	private SimpleImage header_ = new SimpleImage();
	private SimpleImage footer_ = new SimpleImage();
	private Credits credits_ = new Credits();
	private Menu menu_ = new Menu();
	private ArrayList<Page> pages_ = new ArrayList<Page>();
	
	public LearningObject()
	{}

	public String getName()
	{
		return this.name_;
	}
	
	public void setName( String name )
	{
		this.name_ = name;
	}
	
	public SimpleImage getHeader()
	{
		return this.header_;
	}
	
	public void setHeader( SimpleImage header )
	{
		this.header_ = header; 
	}
	
	public SimpleImage getFooter()
	{
		return this.footer_;
	}
	
	public void setFooter( SimpleImage footer )
	{
		this.footer_ = footer; 
	}
	
	public Credits getCredits()
	{
		return this.credits_;
	}
	
	public void setCredits( Credits credits )
	{
		this.credits_ = credits; 
	}
	
	public Menu getMenu()
	{
		return this.menu_;
	}
	
	public void setMenu( Menu menu )
	{
		this.menu_ = menu; 
	}
	
	public ArrayList<Page> getPages()
	{
		return this.pages_;
	}
	
	public void setPages( ArrayList<Page> pages )
	{
		this.pages_ = pages; 
	}

	public Page getPage( String id )
	{
		Page pag = null;
		
		for( Page p : this.pages_ )
		{
         if ( p.getId().equals( id ) )
				return p;
		}
		
		return pag;
	}
}
